﻿$(document).ready(function () {
    disableViewReminderButton();
});
function disableViewReminderButton() {
    $('#ctl00_ContentPlaceHolder3_bt_task_completed').attr('disabled', 'disabled');
    $('#ctl00_ContentPlaceHolder3_bt_dismiss').attr('disabled', 'disabled');
    $('#ctl00_ContentPlaceHolder3_bt_defer').attr('disabled', 'disabled');
}
function enableViewReminderButton() {
    if ($("input[type=checkbox]:checked").length > 0) {
        $('#ctl00_ContentPlaceHolder3_bt_task_completed').removeAttr('disabled');
        $('#ctl00_ContentPlaceHolder3_bt_dismiss').removeAttr('disabled');
        if ($('#ctl00_ContentPlaceHolder3_ddl_deferred').val() != "")
            $('#ctl00_ContentPlaceHolder3_bt_defer').removeAttr('disabled');
    }
    else {
        $('#ctl00_ContentPlaceHolder3_bt_task_completed').attr('disabled', 'disabled');
        $('#ctl00_ContentPlaceHolder3_bt_dismiss').attr('disabled', 'disabled');
        $('#ctl00_ContentPlaceHolder3_bt_defer').attr('disabled', 'disabled');
    }
}
function enableViewReminderDeferButton(sVal) {
    if (sVal.value != "" && $("input[type=checkbox]:checked").length > 0)
        $('#ctl00_ContentPlaceHolder3_bt_defer').removeAttr('disabled');
    else
        $('#ctl00_ContentPlaceHolder3_bt_defer').attr('disabled', 'disabled');
}
function ValidateCheckBoxSelection() {
    if ($("input[type=checkbox]:checked").length == 0)
        alert('Please Select a Task ');
}

//function reload() {
  //  window.opener.__doPostBack('', '');
//}